<template>
  <div>
    <h3>props</h3>
    <button @click="fn">btn</button>
    <Child :count="count" @aaa="bbb" />
  </div>
</template>

<script>
import { ref } from "vue";
import Child from "./07-props-child.vue";
export default {
  setup() {
    const count = ref(4);
    const fn = () => {
      count.value++;
    };
    const bbb = () => {
      console.log("bbb");
    };
    return {
      count,
      fn,
      bbb,
    };
  },
  // components是不能写到setup里面
  components: {
    Child,
  },
};
</script>

<style lang="less" scoped></style>
